fe18599e976dc2e8f443d35e7a8d2e3a3280b3c1,japicmp/src/main/java/japicmp/filter/AnnotationBehaviorFilter.java,AnnotationBehaviorFilter,matches,#CtBehavior#,15
Before Change
@Override
public boolean matches(CtBehavior ctBehavior) {
List attributes = ctBehavior.getMethodInfo().getAttributes();
return hasAnnotation(attributes);
}
@Override
After Change
@Override
public boolean matches(CtBehavior ctBehavior) {
List attributes = ctBehavior.getMethodInfo().getAttributes();
boolean hasAnnotation = hasAnnotation(attributes);
if (!hasAnnotation) {
CtClass declaringClass = ctBehavior.getDeclaringClass();
hasAnnotation = hasAnnotation(declaringClass.getClassFile().getAttributes());
if (!hasAnnotation) {
try {
declaringClass = declaringClass.getDeclaringClass();
if (declaringClass != null) {
hasAnnotation = hasAnnotation(declaringClass.getClassFile().getAttributes());
}
} catch (NotFoundException ignored) {}
}